/*var arr=[1,2,3];
arr.push(4);
arr.join(',') // ='1,2,3'
arr.push([5,6,7]);
var arr1 = arr.concat(['a','b','c']);
arr.reverse();
// console.log(arr);
var a='1222,uuu';
var split = a.split(',');
/!*for (var i in arr){
  console.log(arr[i])
}
for (var i=0;i<arr.length;i++){
  console.log(arr[i])
}*!/

arr1.forEach(function (value, index, array) {
  console.log(array);
})*/
// 字符串方法
/*var str = 'wang chong';
var len = str.length;
var number = str.indexOf('c');
console.log(number);
var s = str.charAt(1);
console.log(s);
var s1 = str.slice(1,3);//开始,结束但不包括结束的这个3对应的值
str.substr(1,3);//开始,长度
console.log(s1);\
str.trim();*/
// 对象
/*isNaN('sss');
Array.isArray(arr);//判断是否是数组;
var obj = {name:'wangchong',age:23};
console.log(obj);
var age = obj.age; // obj['age']
/!*for(var k in obj){
  console.log(k+obj[k]);
}*!/
console.log(arr);
var arr = Object.keys(obj);
for(var i in arr){
  obj[i];
}
var c = obj.hasOwnProperty('nam');
console.log(c);*/


/*var arr=[1,'a',7];
arr.push(2);
arr.push([3,'b',6]);
var arr1=arr.concat([4,5,'c']);
arr.pop();
arr.reverse();
arr.join(',');


for (var i in arr){
  console.log(arr[i])
}
for (var i =0;i<arr.length;i++){
  console.log(arr[i])
}
arr.forEach(function (value) {
  console.log(value)
})*/


/*var str='1,22,333';
var s=str.charAt(1);
var s1=str.indexOf('1');
console.log(s1);
var s2=str.slice(1,3);//开始,结束
var s3=str.substr(1,3);//开始,长度
console.log(s2);
console.log(s3);
var s4 = str.valueOf();
console.log(s4);*/



/*var obj = {name:'lx',sex:'女',age:18};
var n = obj.name;
for (var i in obj){
  console.log(i+obj[i]);
}

var o = obj.hasOwnProperty('name');
var n =2;
switch (n) {
  case 1:
    alert('1');
  break;
  case 2:
    alert('2');
    break;
  default:
      alert('qq');
}*/

/*for (var i=0;i<10;i++)
{
  if (i==3)
  {
    break;
  }
  var x=x + "The number is " + i + "<br>";
}*/
/*
for (var i=0;i<=10;i++)
{
  if (i==3){
    continue;
  }
  var x=x + "The number is " + i + "<br>";
}
*/
/*try {
  adddlert("Welcome guest!");
} catch (e) {
  console.log('发生错误');
}*/
// adddlert("Welcome guest!");


/*var a ={
  "name":"王充",
  "value" :"aa",
  "arr":[s,3,33,3],
  "obj":{name:"dd"}
}*/
var obj = '{"name":"lx","sex":"女","age":18}';
var parse = JSON.parse(obj);
var str = JSON.stringify(parse);
var date = new Date();
var day = date.getDay();
alert(day);
function up(){
  alert(22);
}


var obj = {name:'wc'};
obj.name  = 'sv';
console.log(obj);

var a = 4;


